<template>
  <div class="container">
    <div class="info">
      <el-card class="box-card" v-for="(item,i) in list" :key="item.name">
        <div>
          <div slot="header" class="clearfix">
            <span>第{{i+1}}楼信息反馈</span>
          </div>
          <p class="subitem">用户名：{{item.name}}</p>
          <p class="subitem">邮箱：{{item.email}}</p>
          <p class="subitem">手机号：{{item.phone}}</p>
          <p class="subitem">生日：{{item.date}}</p>
          <p class="subitem">兴趣爱好：{{item.hobby}}</p>
          <p class="subitem">自我介绍：{{item.introduce}}</p>
        </div>
      </el-card>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: []
    };
  },
  created() {
    this.getmessages();
  },
  methods: {
    getmessages() {
      this.list = this.$store.state.Leavemessage;
    }
  }
};
</script>

<style lang="scss" scoped>
.container {
  padding: 10px;
  .subtitle {
    font-size: 16px;
    text-align: center;
  }
  .info {
    margin: 5px, 5px;

    .text {
      font-size: 14px;
    }

    .item {
      margin-bottom: 18px;
    }

    .clearfix:before,
    .clearfix:after {
      display: table;
      content: "";
    }
    .clearfix:after {
      clear: both;
    }

    .subitem {
      margin: 5px;
    }
  }
}
</style>